//
//  PKRequestManager.h
//  PianKe
//
//  Created by lanou on 15/9/26.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import <Foundation/Foundation.h>
//枚举
typedef NS_ENUM(NSInteger, RequestType) {
    POST,
    GET
};
//网络请求完成的block
typedef void(^RequestFinish)(NSData *data);
//网络请求失败的block
typedef void(^RequestError)(NSError *error);

@interface PKRequestManager : NSObject
//外界会调用这个方法，传递过来我们请求所需要的参数，同时把请求完成后处理的函数也传给这个类，方便这个类请求之后把相应的结果通过block回传给外界
//- (void)requestWithType:(RequestType)type urlString:(NSString *)urlString parDic:(NSDictionary *)parDic finish:(RequestFinish)finish error:(RequestError)error;


+ (void)requestWithType:(RequestType)type urlString:(NSString *)urlString parDic:(NSDictionary *)parDic finish:(RequestFinish)finish error:(RequestError)error;
@end
